import axios from 'axios';

// export const base = 'https://qa.ejiakanghu.com.cn/data_statistics';
export const base = 'https://agedmall.ejiakanghu.cn/data_statistics';

const instance = axios.create({
    withCredentials: false,
}); //重写axios

instance.interceptors.request.use(config=>{
    config.headers['Content-Type'] = 'application/json;charset=UTF-8';
    return config;
})

//获取统计数据
export const allStatistics = (data) => {
    return axios.post(`${base}/weilao-datav/adv_service_provider/allStatistics`, data)
};

// //获取下单统计图表
export const orderCountChart = (data) => {
    return axios.post(`${base}/weilao-datav/adv_service_provider/orderCountChart`, data)
};

//获取订单占比统计
export const advOrderRadio = (data) => {
    return axios.post(`${base}/weilao-datav/adv_service_provider/advOrderRadio`, data)
};

//获取最新接车服务列表
export const getLatestOrderList = (data) => {
    return axios.post(`${base}/weilao-datav/adv_service_provider/getLatestOrderList`, data)
};

//获取接车服务类型列表
export const getAdvTypeList = (data) => {
    return axios.post(`${base}/weilao-datav/adv_service_provider/getAdvTypeList`, data)
};